import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../view/Home/Home.vue'
import Magazine from '../view/Magazine/Magazine.vue'
import Subscribers from '../view/Subscribers/Subscribers.vue'
import About from '../view/About/About.vue'
import Catalog from '../view/Catalog/catalog.vue'
import List from '../view/List/list.vue'

Vue.use(VueRouter)
const routes = [
	{
		path:'/home',
		name:'home',
		component:Home
	},
	{
		path:'/magazine',
		name:'magazine',
		component:Magazine
	},
	{
		path:'/magazine/catalog/:id',
		name:'Catalog',
		component:Catalog
	},
	{
		path:'/magazine/catalog/list/:id',
		name:'List',
		component:List
	},
	{
		path:'/subscribers',
		name:'subscribers',
		component:Subscribers
	},
	{
		path:'/about',
		name:'about',
		component:About
	},
	{
		path:'/',
		redirect:'/home'
	}
]

const router = new VueRouter({
	routes
})

export default router

